package adapter;

public class AdapterTest {
    public static void main(String[] args) {
        MediaPlayer mediaPlayer = new OldMediaPlayer();
        AdvancedMediaPlayer advancedMediaPlayer = new MediaPlayerAdapter((MediaPlayer) new NewMediaPlayer());

        // 播放MP3文件
        mediaPlayer.playMp3("song.mp3");

        // 播放WAV文件
        advancedMediaPlayer.playWav("song.wav");

        // 播放OGG文件
        advancedMediaPlayer.playOgg("song.ogg");
    }
}


